<div class="page-header">
							<h1>
							综合素质 学生列表
							</h1>
</div>
<div class="row">
 <div class="col-xs-12">
  <div class="row">
   <div class="col-xs-12">
										<div class="widget-box">
											<div class="widget-header widget-header-small">
												<h5 class="lighter">查询</h5>
											</div>

											<div class="widget-body">
												<div class="widget-main">
													<?php $this->renderPartial('_searchform',array('classRooms'=>$classRooms,'major'=>$major)); ?>
												</div>
											</div>
										</div>
										
</div>
</div>
<hr>
<div class="row">
 <div class="col-xs-12">
                            
                                 <div class="widget-box">
									<div class="widget-header widget-header-small">
									    <h5 class="lighter">共检索出 <?php echo $total; ?> 条数据</h5>
									</div>

								<div class="widget-body">
								   <div class="widget-main">
								  <div class="table-responsive">
											<table id="sample-table-1" class="table table-striped table-bordered table-hover">
												<thead>
													<tr>
														
														<th>姓名</th>
														<th>学号</th>
														<th>班级</th>
														
														<th  >专业</th>
														<th  >年级</th>
														
													 
														
														<th>操作</th>
													</tr>
												</thead>

												<tbody>
												<?php
												  foreach($users as $u){
													  $realName = $u->stuinfo?$u->stuinfo->realName:'未填写';
													  $classRoom = $u->stuinfo?$u->stuinfo->classRoom:'未填写';
													  $major = $u->stuinfo?$u->stuinfo->major:'未填写';
													  $grade = $u->stuinfo?$u->stuinfo->grade:'未填写';
													 echo '
													<tr>
													   
														<td>
															<a href="#">'.$realName.'</a>
														</td>
														
														<td  >'.$u->username.'</td>
														
														<td>'.$classRoom.'</td>
														<td>'.$major.'</td>
														<td>'.$grade.'</td>
														
														

														
														<td>
															<div >
												              
																<a target="_blank" href="'.Yii::app()->CreateUrl('gsp/stugspreport',array('uId'=>$u->uId)).'">
																<button class="btn btn-xs btn-warning" data-rel = "tooltip" data-original-title="详细报表">
																	<i class="icon-bar-chart bigger-120"></i>
																</button>
																</a>
																
															</div>

														</td>
													</tr>';
												  }
                                                   ?>
												</tbody>
											</table>
										</div><!-- /.table-responsive -->
										<div class="col-xs-12" style="text-align:center">
										     <?php 
											 $this->widget('CLinkPager',array( 
													'htmlOptions'=>array('class'=>'pagination'),
													'cssFile'=>false,
													'header'=>'',    
													'firstPageLabel' => '首页',    
													'lastPageLabel' => '末页',    
													'prevPageLabel' => '上一页',    
													'nextPageLabel' => '下一页',    
													'pages' => $pages,    
													'maxButtonCount'=>13    
												)    
											);    
												
										?>
									</div>
								  </div>
								</div>
							 </div>	
  

</div>
</div>
<div class="row">
   <div class="col-sm-2">
			<form target="_blank" method="get" id="export2word" action="<?php echo Yii::app()->createUrl('gsp/exportinteword'); ?>">
					<?php
						$request = Yii::app()->request;
						echo '<input type="hidden" value="'.$request->getParam('grade').'" name="grade">';
						echo '<input type="hidden" value="'.$request->getParam('major').'" name="major">';
						echo '<input type="hidden" value="'.$request->getParam('classRoom').'" name="classRoom">';
						echo '<input type="hidden" value="'.$request->getParam('stuNum').'" name="stuNum">';
					?>
			  <button type="submit" class="btn btn-info" >
				<i class="icon-share"></i>
					导出为 WORD									
			  </button>
		</form>
   </div>
    <div class="col-sm-2">
				<form id="export-form" method="get" action="<?php echo Yii::app()->createUrl('gsp/exportinteexcel');?>" target="_blank" style="display:inline;">
								<?php
								   $request = Yii::app()->request;
								   echo '<input type="hidden" value="'.$request->getParam('grade').'" name="grade">';
								   echo '<input type="hidden" value="'.$request->getParam('major').'" name="major">';
								   echo '<input type="hidden" value="'.$request->getParam('classRoom').'" name="classRoom">';
								   echo '<input type="hidden" value="'.$request->getParam('stuNum').'" name="stuNum">';
								?>
								 <button class="btn btn-success">
									<i class="icon-share-alt" type="button" id="export-button"></i>
										导出为 EXCEL										
								  </button>
				</form>
  
   </div>
</div>

<hr>
</div>
</div>
<script type="text/javascript">

			jQuery(function($) {
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
			
				
			})
		
</script>